package com.burstly.lib.component.networkcomponent.millennial;

import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
import com.burstly.lib.component.IBurstlyAdaptor;
import com.burstly.lib.component.networkcomponent.AbstractAdaptorFactory;
import com.burstly.lib.util.ManifestValidator;
import com.burstly.lib.util.ManifestValidator.ValidationResults;
import com.millennialmedia.android.MMSDK;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class MillennialAdaptorFactory extends AbstractAdaptorFactory
{
  private static final String FULL_CLASS_NAME = "com.millennialmedia.android.MMAdView";
  private static final List<String> MILLENNIAL_MANDATORY_ACTIVITIES = Arrays.asList(new String[] { "com.millennialmedia.android.MMActivity", "com.millennialmedia.android.VideoPlayer" });
  private static final List<String> MILLENNIAL_MANDATORY_PERMISSIONS = Arrays.asList(new String[] { "android.permission.INTERNET", "android.permission.ACCESS_NETWORK_STATE", "android.permission.WRITE_EXTERNAL_STORAGE" });
  private static final List<String> MILLENNIAL_OPTIONAL_PERMISSIONS = Arrays.asList(new String[] { "android.permission.READ_PHONE_STATE" });
  private static final String NETWORK_NAME = "millennial";

  public MillennialAdaptorFactory()
  {
    super("com.millennialmedia.android.MMAdView", MillennialAdaptorFactory.class.getSimpleName());
  }

  protected IBurstlyAdaptor createInstance(Context paramContext, String paramString)
  {
    return new MillennialAdaptor(paramContext, paramString);
  }

  public void initialize(Map<String, ?> paramMap)
    throws IllegalArgumentException
  {
    super.initialize(paramMap);
    MMSDK.initialize((Context)paramMap.get("context"));
    MMSDK.setBroadcastEvents(true);
  }

  public ManifestValidator.ValidationResults validateManifest()
    throws PackageManager.NameNotFoundException
  {
    ManifestValidator.ValidationResults localValidationResults = ManifestValidator.customValidate(MILLENNIAL_MANDATORY_ACTIVITIES, MILLENNIAL_MANDATORY_PERMISSIONS, MILLENNIAL_OPTIONAL_PERMISSIONS);
    localValidationResults.setNetworkName("millennial");
    return localValidationResults;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.component.networkcomponent.millennial.MillennialAdaptorFactory
 * JD-Core Version:    0.6.2
 */